package com.zenchn.model;

import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 系统登录访问日志记录对象
 *
 * @author dingxinfa
 * @date 2020-04-20 11:34
 */
@ApiModel(value="系统登录访问日志记录对象",description="系统登录访问日志记录对象")
public class TSysLoginAccessRecord implements Serializable {
    private static final long serialVersionUID = 156317455570551958L;

    @ApiModelProperty(value="记录ID")
    private String recordId;

    @ApiModelProperty(value="访问IP")
    private String accessIp;

    @ApiModelProperty(value="访问时间")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime accessTime;

    @ApiModelProperty(value="访问位置(来源)")
    private String accessLocation;

    @ApiModelProperty(value="登录人账号ID")
    private String loginAccountId;

    @ApiModelProperty(value="登录人账号")
    private String loginAccount;

    @ApiModelProperty(value="登录人姓名")
    private String loginRealName;

    @ApiModelProperty(value="操作系统")
    private String operatingSystem;

    @ApiModelProperty(value="浏览器")
    private String browser;

    @ApiModelProperty(value="备注")
    private String memo;

    public String getRecordId() {
        return recordId;
    }

    public void setRecordId(String recordId) {
        this.recordId = recordId == null ? null : recordId.trim();
    }

    public String getAccessIp() {
        return accessIp;
    }

    public void setAccessIp(String accessIp) {
        this.accessIp = accessIp == null ? null : accessIp.trim();
    }

    public LocalDateTime getAccessTime() {
        return accessTime;
    }

    public void setAccessTime(LocalDateTime accessTime) {
        this.accessTime = accessTime;
    }

    public String getAccessLocation() {
        return accessLocation;
    }

    public void setAccessLocation(String accessLocation) {
        this.accessLocation = accessLocation == null ? null : accessLocation.trim();
    }

    public String getLoginAccountId() {
        return loginAccountId;
    }

    public void setLoginAccountId(String loginAccountId) {
        this.loginAccountId = loginAccountId == null ? null : loginAccountId.trim();
    }

    public String getLoginAccount() {
        return loginAccount;
    }

    public void setLoginAccount(String loginAccount) {
        this.loginAccount = loginAccount == null ? null : loginAccount.trim();
    }

    public String getLoginRealName() {
        return loginRealName;
    }

    public void setLoginRealName(String loginRealName) {
        this.loginRealName = loginRealName == null ? null : loginRealName.trim();
    }

    public String getOperatingSystem() {
        return operatingSystem;
    }

    public void setOperatingSystem(String operatingSystem) {
        this.operatingSystem = operatingSystem == null ? null : operatingSystem.trim();
    }

    public String getBrowser() {
        return browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser == null ? null : browser.trim();
    }

    public String getMemo() {
        return memo;
    }

    public void setMemo(String memo) {
        this.memo = memo == null ? null : memo.trim();
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", recordId=").append(recordId);
        sb.append(", accessIp=").append(accessIp);
        sb.append(", accessTime=").append(accessTime);
        sb.append(", accessLocation=").append(accessLocation);
        sb.append(", loginAccountId=").append(loginAccountId);
        sb.append(", loginAccount=").append(loginAccount);
        sb.append(", loginRealName=").append(loginRealName);
        sb.append(", operatingSystem=").append(operatingSystem);
        sb.append(", browser=").append(browser);
        sb.append(", memo=").append(memo);
        sb.append("]");
        return sb.toString();
    }
}